package com.liu.webstore.repository;

import com.liu.webstore.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * @Author LiuYumei
 * @Date 2022/7/11 23:06
 */
@Mapper
public interface UserMapper {
    User selectUserById(@Param("id") int id);

    User selectUserByName(@Param("username") String username);

    User selectUserByEmail(@Param("email") String email);

    int insertUser(User user);

    int updateStatus(@Param("userId") int userId, @Param("status") int status);

    int updateHeader(@Param("userId") int userId, @Param("headerUrl") String headerUrl);

    int updatePassword(@Param("userId") int userId, @Param("newPwd") String newPwd);
}
